package com.cn.arcgisdemo;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.esri.arcgisruntime.ArcGISRuntimeEnvironment;
import com.esri.arcgisruntime.mapping.ArcGISMap;
import com.esri.arcgisruntime.mapping.BasemapStyle;
import com.esri.arcgisruntime.mapping.Viewpoint;
import com.esri.arcgisruntime.mapping.view.MapView;

public class LoadArcGisApKey extends AppCompatActivity {

    private MapView mMapView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_load_arcgis_apkey);

        mMapView = findViewById(R.id.mapView);
        mMapView.setAttributionTextVisible(false);
        ArcGISMap map = new ArcGISMap(BasemapStyle.ARCGIS_TOPOGRAPHIC);
        mMapView.setMap(map);
        mMapView.setViewpoint(new Viewpoint(26.15, 107.315800, 10000));

    }


    @Override
    protected void onPause() {
        mMapView.pause();
        super.onPause();

    }

    @Override
    protected void onResume() {
        super.onResume();
        mMapView.resume();
    }

    @Override
    protected void onDestroy() {
        mMapView.dispose();
        super.onDestroy();
    }

    //返回主页
    public void returnMainActivty(View view){
        Intent intent = new Intent(this, MainActivity.class);
        startActivity(intent);
    }
}